package com.fsl.springbootdesignpattern.e_observer;

/**
 * @author sj2
 * 地震预警中心
 */
public class EarthQuakeWarnCenter extends UnderObserver {

    private Integer level;

    public EarthQuakeWarnCenter(Integer level){
        this.level = level;
    }

    public void warning(){
        System.out.println("监控到地震了，地震等级是："+level+"级地震");
        notifyAllObserver(level);
    }

}
